package wjw.mapper;

import com.wjw.mapper.DamageTypeFtableMapper;
import com.wjw.model.Damage_type_ftable;
import com.wjw.utils.GetSqlSessionUtils;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.util.List;

public class DamageTypeFtable {

    private SqlSession sqlsession= GetSqlSessionUtils.getSqlSession();
    private DamageTypeFtableMapper mapper=sqlsession.getMapper(DamageTypeFtableMapper.class);

    @Test
    public void test01(){
        List<Damage_type_ftable> all = mapper.findAll();
        System.out.println(all);
    }

    @Test
    public void test02(){
        Damage_type_ftable damage_type_ftable = new Damage_type_ftable();
        damage_type_ftable.setDamage_type_fname("测试类");
        mapper.add(damage_type_ftable);
        sqlsession.commit();
    }
}
